<%@ page language="java" contentType="text/html; charset=UTF-8"
		 pageEncoding="UTF-8"%>
<%@ taglib uri="/struts-tags" prefix="s"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>购物车</title>

<link href="${pageContext.request.contextPath}/css/common.css" rel="stylesheet" type="text/css">
<link href="${pageContext.request.contextPath}/css/cart.css" rel="stylesheet" type="text/css">


</head>
<body>
<%--<div class="container header">
	<div class="span5">
		<div class="logo">
			<a href="http://localhost:8080/mango/">
				<img src="./image/r___________renleipic_01/logo.gif" alt="传智播客">
			</a>
		</div>
	</div>
	<div class="span9">
<div class="headerAd">
					<img src="./image/header.jpg" width="320" height="50" alt="正品保障" title="正品保障">
</div>	</div>
		<jsp:include page="menu.jsp"/>
	
</div>--%>
<jsp:include page="menu.jsp"/>
<div class="container cart">
        购物车大小：${sessionScope.sessionCart.cartItems.size()}
		<c:if test="${sessionScope.sessionCart.cartItems.size()>0}">
		<div class="span24">
				<table>
					<tbody><tr>
						<th>图片</th>
						<th>商品</th>
						<th>价格</th>
						<th>数量</th>
						<th>小计</th>
						<th>操作</th>
					</tr>
					<c:forEach items="${sessionScope.sessionCart.cartItems}" var="ci">
						<tr>
							<td width="60">
								<input type="hidden" name="id" value="22">
								<img src="${ci.product.image}">
							</td>
							<td>
								<a target="_blank"> ${ci.product.pname}</a>
							</td>
							<td>
								￥${ci.product.shop_price}
							</td>
							<td class="quantity" width="60">
								${ci.count}
							</td>
							<td width="140">
								<span class="subtotal">￥${ci.subtotal}</span>
							</td>
							<td>
								<a href="/deleteCartItme?pid=${ci.product.pid}" class="delete">删除</a>
							</td>
						</tr>
					</c:forEach>
				</tbody></table>
				<dl id="giftItems" class="hidden" style="display: none;">
				</dl>
				<div class="total">
					<em id="promotion"></em>
							<em>
								登录后确认是否享有优惠
							</em>
					赠送积分: <em id="effectivePoint">${sessionCart.total}</em>
					商品金额: <strong id="effectivePrice">￥${sessionCart.total}元</strong>
				</div>
				<div class="bottom">
					<a href="/clearCart" id="clear" class="clear">清空购物车</a>
					<a href="/saveOrder" id="submit" class="submit">提交订单</a>
				</div>
		</div>
		</c:if>
		<c:if test="${sessionScope.sessionCart.cartItems.size() == 0}">
            <h2><span  style="color: #66f4df; align-items: center;">购物车为空，请先购物^-^</span></h2>
		</c:if>
	</div>
<div class="container footer">
	<div class="span24">
		<div class="footerAd">
					<img src="./image/footer.jpg" width="950" height="52" alt="我们的优势" title="我们的优势">
</div>	</div>
	<div class="span24">
		<ul class="bottomNav">
				<li>
						<a >关于我们</a>
						|
					</li>
					<li>
						<a>联系我们</a>
						|
					</li>
					<li>
						<a>招贤纳士</a>
						|
					</li>
					<li>
						<a>法律声明</a>
						|
					</li>
					<li>
						<a>友情链接</a>
						|
					</li>
					<li>
						<a target="_blank">支付方式</a>
						|
					</li>
					<li>
						<a  target="_blank">配送方式</a>
						|
					</li>
					<li>
						<a>服务声明</a>
						|
					</li>
					<li>
						<a>广告声明</a>
						
					</li>
		</ul>
	</div>
	<div class="span24">
		<div class="copyright">Copyright © 2005-2015 网上商城 版权所有</div>
	</div>
</div>
</body></html>